package com.stlm2.dems.user.entity;

/**
 * Created by ZLQ on 2017/8/1.
 */
public enum IsInit {
    Allow(1) {
        public String toString() {
            return "允许初始化";
        }
    },
    NotAllow(0) {
        public String toString() {
            return "不允许初始化";
        }
    };

    private final int val;

    IsInit(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static IsInit getByIntValue(int n) {
        switch (n) {
            case 1:
                return Allow;
            case 0:
                return NotAllow;
            default:
                return null;
        }
    }
}
